﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="clientEdit.aspx.cs" Inherits="clientEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>客户信息</title>
    <link href="css/shipping.css" rel="stylesheet" type="text/css" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <link href="css/cs.css" rel="stylesheet" type="text/css" />
    <link href="css/datePicker.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../js/datePicker.js"></script>

    <script type="text/javascript">
    function delConfirm() {
        var msg = "确定要删除此客户吗?";
        return confirm(msg);    
    }    
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <asp:Label ID="LabelErrorMsg" runat="server" Text="" ForeColor="red"></asp:Label>
            <table class="pageTitle" width="98">
                <tr>
                    <td>
                        客户:
                        <asp:Label ID="LabelClientName" runat="server" Text="Label"></asp:Label></td>
                </tr>
            </table>
            <br />
            <!--input table -->
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <table class="inputTab" width="98%">
                        <asp:Label ID="LabelClientID" runat="server" Visible="false"></asp:Label>
                        <tr>
                            <td>
                                <table class="inputMain">
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            登录名</td>
                                        <td colspan="3">
                                            <asp:Label ID="LabelClientCode" runat="server" Text="" Enabled="false"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            名称<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:TextBox ID="TextBoxClientName" runat="server" CssClass="input" Width="200px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*"
                                                ControlToValidate="TextBoxClientName" /></td>
                                        <td style="width: 100px">
                                            密码<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:TextBox ID="TextBoxPassword" runat="server" CssClass="input" MaxLength="10"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                                                ControlToValidate="TextBoxPassword" /></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            客户类型<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:DropDownList ID="DropDownListClientType" runat="server" CssClass="input">
                                                <asp:ListItem Selected="True" Value="1">零售</asp:ListItem>
                                                <asp:ListItem Value="2">代理</asp:ListItem>
                                                <asp:ListItem Value="0">创天</asp:ListItem>
                                            </asp:DropDownList></td>
                                        <td style="width: 100px">
                                            客户状态<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:DropDownList ID="DropDownListClientStatus" runat="server" CssClass="input">
                                                <asp:ListItem Selected="True">正常</asp:ListItem>
                                                <asp:ListItem>潜在</asp:ListItem>
                                                <asp:ListItem>清理</asp:ListItem>
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px; height: 23px">
                                        </td>
                                        <td style="width: 100px; height: 23px;">
                                            销售代表<span class="fontRed">*</span></td>
                                        <td style="width: 311px; height: 23px;">
                                            <asp:DropDownList ID="DropDownListUser" runat="server" CssClass="input" DataTextField="user_name"
                                                DataValueField="user_id" AppendDataBoundItems="True">
                                                <asp:ListItem Value="">无</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                        <td style="width: 100px; height: 23px;">
                                            付款方式</td>
                                        <td style="height: 23px">
                                            <asp:DropDownList ID="DropDownListPayment" runat="server" CssClass="input" DataTextField="payment_type"
                                                DataValueField="payment_type_id" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            运费方式</td>
                                        <td>
                                            <asp:DropDownList ID="DropDownListShippingFree" runat="server" CssClass="input" DataTextField="shipping_free_type"
                                                DataValueField="shipping_free_type_id" />
                                        </td>
                                        <td style="width: 100px">
                                            账单公司<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:DropDownList ID="DropDownListBillCorp" runat="server" CssClass="input">
                                                <asp:ListItem Selected="True" Value="01">上海创天</asp:ListItem>
                                                <%--                                                <asp:ListItem Value="02">上海弗奥</asp:ListItem>
                                                <asp:ListItem Value="03">江苏创天</asp:ListItem>--%>
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            区域<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:DropDownList ID="DropDownListArea" runat="server" CssClass="input" AppendDataBoundItems="True">
                                                <asp:ListItem Value="">请选择...</asp:ListItem>
                                                <asp:ListItem>东区</asp:ListItem>
                                                <asp:ListItem>南区</asp:ListItem>
                                                <asp:ListItem>西区</asp:ListItem>
                                                <asp:ListItem>北区</asp:ListItem>
                                                <asp:ListItem>其他</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorArea" runat="server" ErrorMessage="*"
                                                ControlToValidate="DropDownListArea" />
                                        </td>
                                        <td style="width: 100px">
                                            <span class="fontRed"><span style="color: #000000">市场</span><span class="fontRed">*</span></span></td>
                                        <td>
                                            <asp:DropDownList ID="DropDownListMarketType" runat="server" CssClass="input">
                                                <asp:ListItem Selected="True" Value="3">门市</asp:ListItem>
                                                <asp:ListItem Value="1">内销</asp:ListItem>
                                                <asp:ListItem Value="4">零配</asp:ListItem>
                                            </asp:DropDownList></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            省<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:TextBox ID="TextBoxState" runat="server" CssClass="input"></asp:TextBox>
                                            <asp:DropDownList ID="DropDownListState" runat="server" CssClass="input" DataTextField="stateName"
                                                DataValueField="stateID" AppendDataBoundItems="True" AutoPostBack="True" OnSelectedIndexChanged="DropDownListState_SelectedIndexChanged">
                                                <asp:ListItem Value="">请选择...</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*"
                                                ControlToValidate="DropDownListState"></asp:RequiredFieldValidator></td>
                                        <td style="width: 100px">
                                            电话<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:TextBox ID="TextBoxPhone" runat="server" CssClass="input"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorPhone" runat="server" ErrorMessage="*"
                                                ControlToValidate="TextBoxPhone" /></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            市<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:TextBox ID="TextBoxCity" runat="server" CssClass="input"></asp:TextBox>
                                            <asp:DropDownList ID="DropDownListCity" runat="server" CssClass="input" DataTextField="cityName"
                                                DataValueField="cityID" AppendDataBoundItems="True" AutoPostBack="True" OnSelectedIndexChanged="DropDownListCity_SelectedIndexChanged">
                                                <asp:ListItem Value="">请选择...</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*"
                                                ControlToValidate="DropDownListCity"></asp:RequiredFieldValidator></td>
                                        <td style="width: 100px">
                                            传真</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxFax" runat="server" CssClass="input"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            地址<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:TextBox ID="TextBoxAddress" runat="server" CssClass="input" Width="300px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorAddress" runat="server" ErrorMessage="*"
                                                ControlToValidate="TextBoxAddress" />
                                        </td>
                                        <td style="width: 100px">
                                            联系人<span class="fontRed">*</span></td>
                                        <td>
                                            <asp:TextBox ID="TextBoxLinkman" runat="server" CssClass="input"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorLinkman" runat="server" ErrorMessage="*"
                                                ControlToValidate="TextBoxLinkman" /></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            邮编</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxPostCode" runat="server" CssClass="input"></asp:TextBox></td>
                                        <td style="width: 100px">
                                            手机</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxCellphone" runat="server" CssClass="input"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            信用额度</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxCreditStatus" runat="server" CssClass="input"></asp:TextBox></td>
                                        <td style="width: 100px">
                                            Email</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxEmail" runat="server" CssClass="input"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            合同类型</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxContractType" runat="server" CssClass="input"></asp:TextBox></td>
                                        <td style="width: 100px">
                                            合作品牌</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxContractBrand" runat="server" CssClass="input"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            合同期限(开始)</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxContractDateBegin" runat="server" CssClass="input"></asp:TextBox>
                                            <a href="javascript:void(0);" onclick="displayDatePicker('TextBoxContractDateBegin');return false">
                                                <img src="../images/date.gif" border="0" align="middle" alt="" /></a>
                                        </td>
                                        <td style="width: 100px">
                                            合同金额</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxContractMoney" runat="server" CssClass="input"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            合同期限(结束)</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxContractDateEnd" runat="server" CssClass="input"></asp:TextBox>
                                            <a href="javascript:void(0);" onclick="displayDatePicker('TextBoxContractDateEnd');return false">
                                                <img src="../images/date.gif" border="0" align="middle" alt="" /></a>
                                        </td>
                                        <td style="width: 100px">
                                            创建日期</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxCreateDate" runat="server" CssClass="input"></asp:TextBox>
                                            <a href="javascript:void(0);" onclick="displayDatePicker('TextBoxCreateDate');return false">
                                                <img src="../images/date.gif" border="0" align="middle" alt="" /></a></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            期初余额</td>
                                        <td>
                                            <asp:TextBox ID="TextBoxBalanceInit" runat="server" CssClass="input"></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="请输入合法的金额"
                                                ControlToValidate="TextBoxBalanceInit" ValidationExpression="[-]?[0-9]*\.?[0-9]{0,2}"></asp:RegularExpressionValidator></td>
                                        <td style="width: 100px">
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            合同内容</td>
                                        <td colspan="3">
                                            <asp:TextBox ID="TextBoxContractBody" runat="server" CssClass="input" Columns="80"
                                                Rows="5" TextMode="MultiLine"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            运费计算方式</td>
                                        <td colspan="3">
                                            <asp:TextBox ID="TextBoxFreeDefine" runat="server" CssClass="input" Columns="80"
                                                Rows="5" TextMode="MultiLine">
                                            </asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25px">
                                        </td>
                                        <td style="width: 100px">
                                            其它</td>
                                        <td colspan="3">
                                            <asp:TextBox ID="TextBoxOther" runat="server" CssClass="input" Columns="80" Rows="5"
                                                TextMode="MultiLine">
                                            </asp:TextBox></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
            <!--footer -->
            <table class="inputTab" width="98%">
                <tr>
                    <td>
                        <table class="inputFooter">
                            <tr align="center">
                                <td>
                                    <asp:Button ID="ButtonSubmit" runat="server" OnClick="ButtonSubmit_Click" Text="保存"
                                        CssClass="button" />
                                    <asp:Button ID="ButtonSubmit2" runat="server" OnClick="ButtonSubmit2_Click" Text="保存并新建"
                                        CssClass="button" />
                                    <asp:Button ID="ButtonCancel" runat="server" OnClientClick="JavaScript: window.history.back(); return false;"
                                        Text="取消" CssClass="button" />
                                </td>
                                <td>
                                    <asp:Button ID="ButtonDel" runat="server" Text="删除" CssClass="button" OnClick="ButtonDel_Click"
                                        OnClientClick="javascript:return delConfirm();" /></td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            .
        </div>
    </form>
</body>
</html>
